In recent times class D amplifiers have become popular for use in audio applications, due to their high efficiency in comparison with other classes of amplifier. Class D amplifiers operate by using a modulator to generate a pulse-width modulated (PWM) square wave comprising a high frequency carrier signal modulated by a lower frequency signal (known as the modulating signal) to be output by a suitable output device such as a loudspeaker. This PWM signal is filtered by a low-pass filter to recover the output signal, which is then output to the output device.
One problem that can arise with class D amplifiers, in particular for audio applications, is that generating a PWM signal of sufficiently high quality can be difficult, particularly when implementation constraints such as a low switching frequency in the PWM modulator are imposed.
A popular approach to this problem is to incorporate a noise-shaping loop around the PWM modulator, to improve performance. FIG. 1 is a schematic representation of a PWM generator in which this approach is used.
The PWM generator is shown generally at 10 in FIG. 1, and includes an interpolator 12, which receives at its input a digital signal representing a signal to be output, such as a digital audio signal. In the example shown in FIG. 1, the input signal is a 24-bit signal having a sampling frequency fs.
The interpolator 12 upsamples the input signal and outputs a output signal X(z) having a frequency of fw, which is typically in the range of a few tens of MHz, but which may be over 100 MHz, to a loop filter 14, which has a very large gain at low frequencies (i.e., in the frequency range within which the PWM output must closely match the input audio signal). The operation of the loop filter 14 will be described in more detail below.
The loop filter 14 outputs a filtered output signal U(z) to a PWM modulator 16. The loop filter output signal U(z) is also, in this example, a 24-bit signal having a sampling frequency of fw.
The PWM modulator 16 includes a comparator 18, which compares the signal U(z) input to the PWM modulator 16 with a carrier signal (which is typically a triangle-wave signal for a double-edge PWM modulation or a sawtooth signal for a single edge PWM modulation) of a given frequency, which may be of the order of ten times the highest frequency component of the input signal X(z), and outputs a single-bit pulse-width modulated signal Y(z) having a sampling frequency of fw. The output of the comparator 18 is binary, and the entire PWM modulation process can be modelled as a quantisation noise source generating a noise signal E(z).
The PWM output signal Y(z) is fed back to a combiner 20, where it is subtracted from the interpolated signal X(z) output by the interpolator 12, to compute the difference between the interpolated signal X(z) and the PWM output signal Y(z). The signal output by the combiner 20 that is input to the loop filter 14 includes a low frequency component, due to the input signal X(z) and the low frequency component of the modulated output signal Y(z), and a high frequency component, due to the high frequency carrier signal component of the modulated signal Y(z). Due to the high gain of the loop filter in the lower frequency ranges and as a result of the feedback loop, the output of the PWM modulator Y(z) only contains the low frequency component of the interpolated input signal X(z) and a shaped error signal with a reduced amount of energy in the low frequency range. This can be modelled mathematically as follows.
A noise transfer function NTF(z) may be defined as
            Y      ⁡              (        z        )                    E      ⁡              (        z        )              ,where E(z) is the noise signal introduced by the PWM modulation process. Similarly, a signal transfer function STF(z) may be defined as
            Y      ⁡              (        z        )                    X      ⁡              (        z        )              .
It can be shown that
            NTF      ⁡              (        z        )              =          1              1        +                  G          ⁡                      (            z            )                                and            STF      ⁡              (        z        )              =                  G        ⁡                  (          z          )                            1        +                  G          ⁡                      (            z            )                              where G(z) is the loop gain.
At low frequencies where the loop gain is very large (i.e. G(z)>>1), NTF(z)≈0 and STF(z)≈1.
Despite the very large oversampling factor relative to the bandwidth of the input signal (sampling at tens of MHz for an audio input signal having a bandwidth of around 20 kHz) and the high loop gain that can be achieved using the architecture illustrated in FIG. 1, the output PWM signal Y(z) is often of insufficient quality for HiFi quality audio. This is at least partly because intermodulation products can arise in the output of the PWM modulator 16 around multiples of the switching frequency of the PWM modulator 16. These intermodulation products lead to unacceptable levels of harmonic distortion in the PWM signal output by the PWM generator 10, even when a feedback loop of the type illustrated in FIG. 1 is employed.
Accordingly, a need exists in the art for a PWM generator that is capable of generating a PWM signal of sufficient quality for use in audio applications.